﻿<ui:VsDialogWindow
    x:Class="NuGet.Client.VisualStudio.UI.ErrorReportingDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:resx="clr-namespace:NuGet.Client.VisualStudio.UI.Resources"
    xmlns:ui="clr-namespace:NuGet.Client.VisualStudio.UI"
    Background="{DynamicResource {x:Static resx:Brushes.HeaderBackground}}"
    Foreground="{DynamicResource {x:Static resx:Brushes.UIText}}"
    mc:Ignorable="d"
    ShowInTaskbar="False"
    WindowStartupLocation="CenterOwner"
    Title="{x:Static resx:Resources.WindowTitle_Error}"
    MinWidth="300"
    MinHeight="200"
    Width="350"
    Height="200"
    d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto" />
        </Grid.RowDefinitions>

        <Grid Margin="24,16,24,8">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>

            <Rectangle Grid.Column="0"
                           VerticalAlignment="Top"
                           Width="32" Height="32">
                <Rectangle.Fill>
                    <DrawingBrush>
                        <DrawingBrush.Drawing>
                            <DrawingGroup>
                                <DrawingGroup.Children>
                                    <GeometryDrawing Brush="#FFF6F6F6" Geometry="F1M8,0C3.582,0 0,3.582 0,8 0,12.418 3.582,16 8,16 12.418,16 16,12.418 16,8 16,3.582 12.418,0 8,0" />
                                    <GeometryDrawing Brush="#FFE51300" Geometry="F1M12.4141,11L11.0001,12.414 8.0001,9.414 5.0001,12.414 3.5861,11 6.5861,8 3.5861,5 5.0001,3.586 8.0001,6.586 11.0001,3.586 12.4141,5 9.4141,8z M8.0001,1C4.1341,1 1.0001,4.135 1.0001,8 1.0001,11.865 4.1341,15 8.0001,15 11.8651,15 15.0001,11.865 15.0001,8 15.0001,4.135 11.8651,1 8.0001,1" />
                                    <GeometryDrawing Brush="#FFFFFFFF" Geometry="F1M12.4141,5L11.0001,3.586 8.0001,6.586 5.0001,3.586 3.5861,5 6.5861,8 3.5861,11 5.0001,12.414 8.0001,9.414 11.0001,12.414 12.4141,11 9.4141,8z" />
                                </DrawingGroup.Children>
                            </DrawingGroup>
                        </DrawingBrush.Drawing>
                    </DrawingBrush>
                </Rectangle.Fill>
            </Rectangle>
            <ScrollViewer Grid.Column="1" Margin="8,0,0,0" VerticalScrollBarVisibility="Auto">
                <TextBlock TextWrapping="Wrap"
                       x:Name="_message" />
            </ScrollViewer>
        </Grid>

        <Expander Grid.Row="1"
                  Header="{x:Static resx:Resources.Text_ErrorDetails}" Margin="8,0"
                  Foreground="{DynamicResource {x:Static resx:Brushes.UIText}}"
                  Collapsed="Expander_Collapsed" Expanded="Expander_Expanded">
            <Border BorderThickness="1" BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}" Height="150" x:Name="_detailPart"
                    Margin="0,8">
                <ScrollViewer HorizontalScrollBarVisibility="Disabled">
                    <TextBox TextWrapping="Wrap" BorderThickness="0"
                             IsReadOnly="True"
                             x:Name="_detail" />
                </ScrollViewer>
            </Border>
        </Expander>

        <Grid Grid.Row="2" Margin="8,8">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="auto" />
            </Grid.ColumnDefinitions>
            <Button Grid.Column="1" Width="50"
                    Content="{x:Static resx:Resources.Button_OK}" Height="20" VerticalAlignment="Bottom" Click="Button_Click"></Button>
        </Grid>
    </Grid>
</ui:VsDialogWindow>